package com.mtsmda.designPattern1.creational.abstract_factory;

public class CountryFactory extends AbstractFactory {

	@Override
	public Continent getContinent(String content) {
		return null;
	}

	@Override
	public Country getCountry(String country) {
		if (country == null || country.isEmpty()) {
			return null;
		}

		switch (country) {
		case Country.RUSSIA:
			return new Russia();

		case Country.GERMANY:
			return new Germany();

		case Country.CHINA:
			return new China();

		case Country.UAR:
			return new UAR();

		case Country.JAPAN:
			return new Japan();

		}

		return null;
	}

}